package service.impl;

import dao.storageRecord.StorageRecordMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pojo.StorageRecord;
import service.StorageRecordService;

import javax.annotation.Resource;

/**
 * @author 崔书健
 * @date 2024/7/24
 */
@Transactional
@Service("StorageRecordService")
public class StorageRecordServiceImpl implements StorageRecordService {

    @Resource
    private StorageRecordMapper storageRecordMapper;

    public void setStorageRecordMapper(StorageRecordMapper storageRecordMapper) {
        this.storageRecordMapper = storageRecordMapper;
    }

    @Override
    public int addStorageRecord(StorageRecord storageRecord) {
        return storageRecordMapper.addStorageRecord(storageRecord);
    }

    @Override
    public int upd(StorageRecord storageRecord) {
        return storageRecordMapper.upd(storageRecord);
    }

    @Override
    public int del(Integer id) {
        return storageRecordMapper.del(id);
    }
}
